﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GoShopping.Model;

namespace GoShopping.BLL.PrdctInfo
{
    /// <summary>
    /// 缺货记录表
    /// </summary>
    public class StockoutBean
    {
        public IList<Stockout> GetAll()
        {
            return Databases.DBGoShopping.Select(
                GoShoppingNBear.Stockout).ToList<Stockout>();
        }

        public void Add(Stockout st)
        {
            Databases.DBGoShopping.Insert(GoShoppingNBear.Stockout).AddColumn(
                GoShoppingNBear.Stockout.CreateDate, DateTime.Now).AddColumn(
                GoShoppingNBear.Stockout.IsReply, st.IsReply).AddColumn(
                GoShoppingNBear.Stockout.Name, st.Name).AddColumn(
                GoShoppingNBear.Stockout.UserID, st.UserID).Execute();
        }
    }
}
